#pragma once
#include "object.h"
#include "Array2D.h"
#include "Array3D.h"
#include "coords.h"
#include "message.h"

#define	ROT_LEFT		1
#define ROT_RIGHT		2
#define ROT_CLKWISE		3
#define ROT_CCLKWISE	4

class CCube :
	public CObject
{
public:
	CCube(void);
	~CCube(void);

	virtual void	parseMessage(Message& msg, vector<Message>& retMsg);

private:
	CCoords*		getNewCoords(const CCoords* oldCoords, int rotDirection);
	CArray2D*		getSurrCells(const CCoords* pos);
	CArray2D*		getCrossSection(const CCoords* pos);
	void			Rotate(int direction);

private:
	CArray2D	*section, *bgSection;
	CArray3D	*cube;
//	int		x,y,z;
	int		xs,ys,zs;	// array size
//	int		ax,ay,az;	// rotation angle

};
